export interface MenuItem {
  label: string;
  path: string;
}

interface MenuConfig {
  [key: string]: MenuItem[];
}

export const menuConfig: MenuConfig = {
  javascript: [
    { label: '变量和数据类型', path: '/javascript/variables' },
    { label: '运算符和表达式', path: '/javascript/operators' },
    { label: '控制流程', path: '/javascript/control-flow' },
    { label: '函数和作用域', path: '/javascript/functions' },
    { label: '对象和原型', path: '/javascript/objects' },
    { label: '异步编程', path: '/javascript/async' },
    { label: 'DOM和事件处理', path: '/javascript/dom' },
    { label: '模块化和打包', path: '/javascript/modules' },
    { label: '设计模式', path: '/javascript/design-patterns' },
    { label: '测试和调试', path: '/javascript/testing' },
  ],
  javascriptBasics: [
    { label: '变量和数据类型', path: '/javascript-basics/variables' },
    { label: '运算符和表达式', path: '/javascript-basics/operators' },
    { label: '控制流程', path: '/javascript-basics/control-flow' },
    { label: '函数和作用域', path: '/javascript-basics/functions' },
    { label: '对象和原型', path: '/javascript-basics/objects' },
    { label: '异步编程', path: '/javascript-basics/async' },
    { label: 'DOM和事件处理', path: '/javascript-basics/dom' },
    { label: '模块化和打包', path: '/javascript-basics/modules' },
    { label: '设计模式', path: '/javascript-basics/patterns' },
    { label: '测试和调试', path: '/javascript-basics/testing' },
  ],
  javascriptAdvanced: [
    { label: '闭包', path: '/javascript-advanced/closure' },
    { label: '原型与原型链', path: '/javascript-advanced/prototype' },
    { label: '异步编程', path: '/javascript-advanced/async' },
    { label: '事件循环', path: '/javascript-advanced/event-loop' },
    { label: '内存管理', path: '/javascript-advanced/memory' },
  ],
  react: [
    { label: 'React简介', path: '/react/introduction' },
    { label: 'JSX语法', path: '/react/jsx' },
    { label: '组件基础', path: '/react/components' },
    { label: 'Props和State', path: '/react/props-state' },
    { label: '生命周期', path: '/react/lifecycle' },
    { label: 'Hooks使用', path: '/react/hooks' },
    { label: '状态管理', path: '/react/state-management' },
    { label: '路由管理', path: '/react/routing' },
    { label: '表单处理', path: '/react/forms' },
    { label: 'API调用', path: '/react/api-calls' },
  ],
  reactBasics: [
    { label: 'React简介', path: '/react-basics/introduction' },
    { label: 'JSX语法', path: '/react-basics/jsx' },
    { label: '组件基础', path: '/react-basics/components' },
    { label: 'Props和State', path: '/react-basics/props-state' },
    { label: '生命周期', path: '/react-basics/lifecycle' },
    { label: '事件处理', path: '/react-basics/events' },
    { label: '条件渲染', path: '/react-basics/conditional' },
    { label: '列表和Keys', path: '/react-basics/lists' },
    { label: '表单处理', path: '/react-basics/forms' },
    { label: '组件组合', path: '/react-basics/composition' },
  ],
  reactAdvanced: [
    { label: 'Hooks深入', path: '/react-advanced/hooks' },
    { label: '状态管理', path: '/react-advanced/state-management' },
    { label: '路由管理', path: '/react-advanced/routing' },
    { label: '性能优化', path: '/react-advanced/performance' },
    { label: '高阶组件', path: '/react-advanced/hoc' },
    { label: 'Context API', path: '/react-advanced/context' },
    { label: '错误边界', path: '/react-advanced/error-boundaries' },
    { label: '服务端渲染', path: '/react-advanced/ssr' },
    { label: '测试策略', path: '/react-advanced/testing' },
    { label: '最佳实践', path: '/react-advanced/best-practices' },
  ],
  dataStructures: [
    { label: '链表', path: '/data-structures/linked-list' },
    { label: '树', path: '/data-structures/tree' },
    { label: '图', path: '/data-structures/graph' },
    { label: '堆', path: '/data-structures/heap' },
    { label: '栈和队列', path: '/data-structures/stack-queue' },
  ],
  algorithms: [
    { label: '排序算法', path: '/algorithms/sorting' },
    { label: '搜索算法', path: '/algorithms/searching' },
    { label: '动态规划', path: '/algorithms/dynamic-programming' },
    { label: '贪心算法', path: '/algorithms/greedy' },
    { label: '字符串算法', path: '/algorithms/string' },
  ],
};
